#include <iostream>
using namespace std;

int main() {
    int a = 0, b = 0;
    cin >> a;
    int fa = a;
    while(fa) {
        b = b * 10 + fa % 10;
        fa /= 10;
    }
    cout << b + a;
}
// 64 位输出请用 printf("%lld")